package com.scs.application.enums;

import lombok.Getter;

/**
 * @description: 耗材报价单状态
 */
@Getter
public enum MaterialBidStatus {
    UNSUBMIT("unsubmit","已发布"),
    SUBMITTED("submited","已提交"),
    FINISHED("finished","已完成"),
    CANCELED("canceled","已取消");

    private String value;

    private String name;

    MaterialBidStatus(String value, String name) {
        this.value = value;
        this.name = name;
    }

    public static MaterialBidStatus of(String value) {
        switch (value){
            case "unsubmit":
                return MaterialBidStatus.UNSUBMIT;
            case "submited":
                return MaterialBidStatus.SUBMITTED;
            case "finished":
                return MaterialBidStatus.FINISHED;
            case "canceled":
                return MaterialBidStatus.CANCELED;
            default:
                return MaterialBidStatus.UNSUBMIT;
        }
    }


}
